import Vue from 'vue'
import VueRouter from 'vue-router'


Vue.use(VueRouter)

const routes = [
    {
      path : '/',
      component : ()=> import('@/views/layout/index'),
      redirect : '/',
      children : [
        {
          path : '/',
          component : ()=> import('@/views/home/index'),
         },
        
         {
          path : '/qa',
          component : ()=> import('@/views/qa/index'),
         },
         {
          path : '/video',
          component : ()=> import('@/views/video/index'),
         },
         {
          path : '/my',
          component : ()=> import('@/views/my/index'),
         },
      ]
    },
    {
      path : '/search/',
      component : ()=> import('@/views/search/index'),
     },
     {
      path : '/article/:id',
      component : ()=> import('@/views/article/index'),
     },
    {
      path : '/login',
      component : ()=> import('@/views/Login/index'),
      
    },

    {
      path : '/user/profile',
      component : ()=> import('@/views/user/profile'),
    }
]

const router = new VueRouter({
  routes
})

export default router
